{template '_header'}
<div class="page-heading"><h2><i class="fa fa-circle-o"></i>系统授权 </h2></div>


<form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >

    <div class="form-group">
        <label class="col-sm-1 control-label">域名</label>
        <div class="col-sm-9 col-xs-12">
            <input type="text" name="domain" class="form-control" value="{$domain}" readonly/>
            <span class="help-block">服务器域名</span>
        </div>
    </div>
     <!-- <div class="form-group">
        <label class="col-sm-2 control-label">站点IP</label>
        <div class="col-sm-9 col-xs-12">
            <input type="text" name="ip" class="form-control" value="{$ip}" readonly/>
            <span class="help-block">站点IP</span>
        </div>
    </div>
  <div class="form-group">
        <label class="col-sm-2 control-label">站点ID</label>
        <div class="col-sm-9 col-xs-12">
            <input type="text" name="id" class="form-control" value="{$id}" readonly />
            <span class="help-block">站点ID,如果为空，请到 <a href='{php echo url('cloud/profile')}'>站点注册</a> 绑定您的服务器</span>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">授权码</label>
        <div class="col-sm-9 col-xs-12">
            <input type="text" name="code" class="form-control" value="{$auth['code']}" data-rule-required='true' data-msg-required='请填写授权码' />
            <span class="help-block">请联系客服将IP及站点ID提交给客服, 索取授权码，保护好您的授权码，避免泄漏</span>
        </div>
    </div>-->
    <div class="form-group">
        <label class="col-sm-1 control-label">授权状态</label>
        <div class="col-sm-9 col-xs-12">
            <div class='form-control-static'>
                {if !empty($result['status'])}
                <span class='label label-primary'>已授权</span>
                {elseif $status==0}
                <span class='label label-danger'>未授权</span>
                {/if}
            </div>
        </div>
    </div>
    {if !empty($result['status'])}
    <div class="form-group">
        <label class="col-sm-1 control-label">更新服务到期时间</label>
        <div class="col-sm-9 col-xs-12">
            <div class='form-control-static'>
                <span class='label label-warning'>{$result['result']['auth_date_end']}</span>
            </div>
        </div>
    </div>
    {/if}

    <div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-9 col-xs-12">
            <div class='form-control-static'>

                <input type="submit"  value="验证授权" class="btn btn-primary" />
                {if !empty($result['status'])}
                <input type="button" style="margin-left:10px;" onclick="location.href='{php echo webUrl('system/auth/upgrade')}'" value="系统升级" class="btn btn-success" />
                {/if}

            </div>
        </div>
    </div>
</form>
{template '_footer'}